package com.ccav.core.customer;

import com.ccav.api.mapper.BaseDictMapper;
import com.ccav.api.pojo.BaseDict;
import com.ccav.api.pojo.BaseDictExample;
import com.ccav.api.service.BaseDictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class BaseDictServiceImpl implements BaseDictService {

    @Autowired
    BaseDictMapper baseDictMapper;

    @Override
    public List<BaseDict> selectBaseDictByType(String type){
        BaseDictExample example = new BaseDictExample();
        BaseDictExample.Criteria criteria = example.createCriteria();
        criteria.andDictTypeCodeEqualTo(type);
        List<BaseDict> baseDicts = baseDictMapper.selectByExample(example);
        return baseDicts;
    }

}
